package com.Threecharacters.Poly_.Polyparameter.Case;

public class Master {
    String name;

    public Master(String name) {
        this.name = name;
    }
    //减少代码的重复率
    //增加复用率
    //只用写这一行代码就能反复使用，增加维护效率
    public void feed(Animal animal, Food food){
        System.out.println("主人 " + name + " 给 " + animal.getName() + " 吃 " + food.getName()  );
    }





}
